<!DOCTYPE html>
<html>

{include file='public/header'}
<style>
    .layui-table th {
        text-align: center;
    }

    .layui-table td {
        text-align: center;
    }

    .layui-input-block {
        margin-left: 75px;
    }

</style>

<body>
<div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="/admin/Local/index/">视频管理</a>
            <a><cite>视频列表</cite></a>
        </span>
    <a class="layui-btn layui-btn-small" id="reload" title="刷新">
        <i class="layui-icon" style="line-height:30px"><i class="iconfont">&#xe6aa;</i></i>
    </a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form">

            <div class="layui-inline">
                <label class="layui-form-label w-auto">员工：</label>
                <div id="pMenu"></div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label w-auto">时间：</label>
                <div class="layui-inline" id="time" style="display: flex;align-items: center;">
                    <div class="layui-input-inline" style="margin-right:10px">
                        <input type="text" autocomplete="off" name="start_date" id="start_date" class="layui-input"
                               placeholder="开始日期">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" name="end_date" id="end_date" class="layui-input"
                               placeholder="结束日期">
                    </div>
                </div>
            </div>

            <button class="layui-btn" style="margin-left: 10px;" lay-submit lay-filter="searchList">搜索</button>
            <button type="reset" id="resetList" class="layui-btn layui-btn-primary">重置</button>
            <!--                <a href="/admin/Local/index/" class="layui-btn">返回视频列表</a>-->
        </form>
    </div>

    <table id="video" lay-filter="video"></table>
</div>


<script type="text/html" id="urlTemplet">

    <video src={{d.url}} height="30" data-type="2" class="preview-all"></video>

</script>
<script type="text/html" id="typeTemplet">

    <button class="layui-btn layui-btn-danger layui-btn-xs">统计</button>

</script>

<script>
    let video_id = GetQueryString('video_id')
    let params = {
        elem: '#video'

        , url: '{:url("admin/Actionlog/list")}' //数据接口
        , page: true //开启分页
        , id: 'video'
        , where: {video_id}
        , limit: 20
        , cols: [[//表头

             {field: 'id', title: 'ID',width: 100},
            {
                field: 'created_at', title: '操作时间', templet: function (d) {
                     return '<span style="font-size: 12px;">'+dayjsFormat(d.created_at) +'</span>'
                }
            }
            , {field: 'adminname', title: '操作人'}
            , {field: 'content', title: '操作内容'}
            , {field: 'video_id', title: '文件ID'}


        ]]

    }
    tableList(params)
    let selectParams = {
        url: '/admin/admin/select',
        elem: '#pMenu',
        selected: [],
        tips: '选择员工',
        name: 'local_id',
        field_id: 'id',
        field_Name: 'name',
    }
    selectN(selectParams)
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        //日期范围
        laydate.render({
            elem: '#time'
            , range: ['#start_date', '#end_date']
            , format: 'yyyy-MM-dd',
        });
    })

</script>
</body>

</html>